import React from 'react';
import {
    NavLink,
    Routes,
    Route
} from "react-router-dom";
import AddGoods from "./pages/AddGoods";
import GoodsList from "./pages/GoodsList";
import CartList from "./pages/CartList";
import "./App.css"
function App(props) {
    return (
        <div className={"container"}>
            <nav>
                <NavLink to={"/"}>添加商品</NavLink>
                <NavLink to={"/goodsList"}>商品列表</NavLink>
                <NavLink to={"/cartList"}>我的购物车</NavLink>
            </nav>
            <Routes>
                <Route path={"/"} element={<AddGoods/>}></Route>
                <Route path={"/goodsList"} element={<GoodsList/>}></Route>
                <Route path={"/cartList"} element={<CartList/>}></Route>
            </Routes>
        </div>
    );
}

export default App;